DROP TABLE IF EXISTS jms_ods.cycle_transfer_record ;
CREATE EXTERNAL TABLE `jms_ods.cycle_transfer_record`(
  `id` bigint COMMENT '主键ID',
  `transfer_code` string COMMENT '调拨单号',
  `task_code` string COMMENT '任务单号',
  `transfer_type` bigint COMMENT '调拨类型:1调拨出库；2调拨入库',
  `scan_time` timestamp COMMENT '扫描时间',
  `scan_network_code` string COMMENT '扫描网点编码',
  `scan_network_name` string COMMENT '扫描网点名称',
  `recycle_bags_number` bigint COMMENT '循环袋数量（数量=包数*20）',
  `recycle_bags_weight` bigint COMMENT '重量（重量=包数*8，单位为kg）',
  `next_network_code` string COMMENT '下一站网点编码',
  `next_network_name` string COMMENT '下一站网点名称',
  `scan_by_name` string COMMENT '扫描人员名称',
  `scan_by_code` string COMMENT '扫描员编码',
  `upload_time` timestamp COMMENT '上传时间',
  `package_quantity` bigint COMMENT '包数量')
COMMENT '循环袋表'
PARTITIONED BY (
  `dt` string COMMENT '时间分区')
stored as parquet
location "/dw/hive/jms_ods.db/external/cycle_transfer_record";
MSCK REPAIR TABLE jms_ods.cycle_transfer_record;